package org.rency.crawler.domain.vo;

import java.nio.charset.Charset;
import java.util.Objects;

/**
 * 名称:DocQueue
 * 描述:文档对象
 *
 * @author:rency
 * @version:V1.0.0
 * @JDK 1.8
 * @since 2017/11/22 21:55
 */
public class DocDomain extends BaseDomain {

  /**
   * 页面标识(URL MD5)
   */
  private String docNo;

  /**
   * 页面地址
   */
  private String docUri;

  /**
   * 页面快照
   */
  private byte[] html;

  /**
   * 页面内容(文本)
   */
  private byte[] text;

  /**
   * 页面指纹
   */
  private String finger;

  /**
   * 字符集
   */
  private Charset charset;

  /**
   * 标题
   */
  private String title;

  /**
   * 关键字
   */
  private String keywords;

  /**
   * 描述
   */
  private String description;

  public String getDocNo() {
    return docNo;
  }

  public void setDocNo(String docNo) {
    this.docNo = docNo;
  }

  public String getDocUri() {
    return docUri;
  }

  public void setDocUri(String docUri) {
    this.docUri = docUri;
  }

  public byte[] getHtml() {
    return html;
  }

  public void setHtml(byte[] html) {
    this.html = html;
  }

  public byte[] getText() {
    return text;
  }

  public void setText(byte[] text) {
    this.text = text;
  }

  public String getFinger() {
    return finger;
  }

  public void setFinger(String finger) {
    this.finger = finger;
  }

  public Charset getCharset() {
    return charset;
  }

  public void setCharset(Charset charset) {
    this.charset = charset;
  }

  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }

  public String getKeywords() {
    return keywords;
  }

  public void setKeywords(String keywords) {
    this.keywords = keywords;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DocDomain docDomain = (DocDomain) o;
    return Objects.equals(docNo, docDomain.docNo);
  }

  @Override
  public int hashCode() {
    return Objects.hash(docNo);
  }
}
